<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:ace="http://www.icefaces.org/icefaces/components"
    xmlns:ice="http://www.icesoft.com/icefaces/component"
    xmlns:icecore="http://www.icefaces.org/icefaces/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    template="/resources/templates/main-template.xhtml">
    
    <!--  -->
    <ui:param name="title" value="#{msgs[dataTableBean.title]}"/>
    <ui:param name="description" value="#{msgs[dataTableBean.description]}"/>
    <ui:param name="subMenuTitle" value="#{msgs[dataTableBean.subMenuTitle]}"/>
    <ui:param name="subMenuLinks" value="#{dataTableBean.subMenuLinks}"/>
    <ui:param name="resourceValue" value="#{dataTableBean.exampleResource}"/>
    
    <ui:param name="wikiResources" value="#{dataTableResources.wikiResources}"/>
    <ui:param name="tldResources" value="#{dataTableResources.tldResources}"/>
    
    <ui:define name="component-main">
		<h:form>
			<h:messages />
			<h:panelGrid columns="4">
			</h:panelGrid>
			<h:panelGrid columns="4">
			</h:panelGrid>
			<ice:dataTable value="#{priceMngBean.uiModels}" var="uiModel">
				<ice:column>
					<f:facet name="header">ID</f:facet>
					<h:outputText value="#{uiModel.stringId}" />
				</ice:column>

				<ice:column>
					<f:facet name="header">Name</f:facet>
					<h:commandLink value="#{uiModel.model.articleName}" action="#{priceMngBean.viewArticle}" immediate="true">
					<f:param name="articleId" value="#{uiModel.stringId}"/> 
					</h:commandLink>
				</ice:column>

				<ice:column>
					<f:facet name="header">UPC</f:facet>
					<h:outputText value="#{uiModel.model.articleUPC}" />
				</ice:column>

				<ice:column>
					<f:facet name="header">Specification</f:facet>
					<h:outputText value="#{uiModel.model.specification}" />
				</ice:column>

				<ice:column>
					<f:facet name="header">Package Net</f:facet>
					<h:outputText value="#{uiModel.model.packageNet}" />
				</ice:column>

				<ice:column>
					<f:facet name="header">Brand</f:facet>
					<h:outputText value="#{uiModel.model.brand}" />
				</ice:column>
				<ice:column>
					<f:facet name="header">Lowest Price</f:facet>
					<h:outputText value="#{uiModel.model.brand}" />
				</ice:column>
				<ice:column>
					<f:facet name="header">Lowest Price Store</f:facet>
					<h:outputText value="#{uiModel.model.brand}" />
				</ice:column>
				<ice:column>
					<f:facet name="header">Highest Price</f:facet>
					<h:outputText value="#{uiModel.model.brand}" />
				</ice:column>
				<ice:column>
					<f:facet name="header">Highest Price Store</f:facet>
					<h:outputText value="#{uiModel.model.brand}" />
				</ice:column>				
			</ice:dataTable>
			<h:commandButton value="Add" action="#{priceMngBean.addArticle}"></h:commandButton>
		</h:form>
    </ui:define>
</ui:composition>